<!DOCTYPE html>
<html>
<head>
	<title>兼容pageX</title>
	<style type="text/css">
		div {
			width: 100px;
			height: 500px;
			background: red;
		}
	</style>
</head>
<body>
<div>
	<div>sdf</div>
	<div>sdf</div>
	<div>sdf</div>
	<div>sdf</div>
</div>
</body>
<script type="text/javascript">
	
document.onclick = function(e) {
	e = e || window.event;
	if (e.pageX) {
		console.log(e.pageX, e.pageY);
	} else {
		var x1 = e.clientX;
		var y1 = e.clientY;
		var x2 = document.body.scrollLeft || document.documentElement.scrollLeft;
		var y2 = document.body.scrollTop || document.documentElement.scrollTop;
		console.log(x1 + x2, y1 + y2);
	}
}

</script>
</html>